//
//  Emoji.swift
//  EmojiKeyBoard
//
//  Created by macs on 15/11/20.
//  Copyright © 2015年 BlackTail. All rights reserved.
//

import UIKit

class Emoji: NSObject {
    var id : String?
    //图片名称
    var png : String?
    //表情名
    var chs : String?
    //emoji 16进制字符串
    var code : String?
    //emoji表情字符串
    var codeString : String? {
        return code?.emojiString
    }
    //图片路径计算属性
    var imagePath : String? {
        
        if let idName = id , pngName = png {
            
            return NSBundle.mainBundle().bundlePath + "/Emoticons.bundle/" + "\(idName)/" + pngName
        }
        return nil
    }
    //是否是删除按钮标记
    var isRemove : Bool = false
    //是否是空按钮标记
    var isEmpty : Bool  = false
    
    init(isRemove : Bool){
        self.isRemove = isRemove
        super.init()
    }
    
    init(isEmpty : Bool){
        self.isEmpty = isEmpty
        super.init()
    }
    
    
    init(id : String , dict : [String : String]) {
        self.id = id
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
    
    
}
